import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/pv/list',
    method: 'get',
    params: query
  })
}

// 我的pv值查看详情 个人 订单
export function findOrders(data){
    return request({
      url:'http://api.hometasty.info/shop2/wx/pv/findOrders',
      method:'post',
      params:data
    })
  }
  export function findOrders2(data){
    return new Promise((resolve,reject)=>{
      resolve(request({
        url:'http://api.hometasty.info/shop2/wx/pv/findOrders',
        method:'post',
        params:data
      })) 
    })
  }
  export function getMonthPv2(data){
    return new Promise((resolve,reject)=>{
      resolve(request({
        url:'http://www.hometasty.info/demo/oderpv.php',
        method:'get',
        params:data
      }))
      
    })
     
  }
  export function getMonthPv(data){
    return request({
      url:'http://www.hometasty.info/demo/oderpv.php',
      method:'get',
      params:data
    })
  }
export function updateUser(data) {
  return request({
    url: '/pv/update',
    method: 'post',
    data
  })
}

// 我的pv值查看详情 订单商品
export function ordersGoodsPv(data){
  return request({
    url:'/wx/pv/ordersGoodsPv',
    method:'post',
    data:data
  })
}
